Visual Basic 5.0 Program: "VB Slingshot"

The program VB Slingshot uses the standard Newton's Law to calculate the trajectories of 3 objects based on observations written in Visual Basic 5.0.
Newton's Law assumes that the sum of all the forces of all objects is zero.
Newton's Law law describes that the force between two objects is "equal" to the mass m1 times the mass m2 of each object divided by the distance. Because this force acts twice but in opposite directions as such the sum is zero. Because this is true for all objects and all forces the sum of all forces is zero.

For a more technical explanation about what the slingshot effect is read this: Program 10: Sling Shot Effect and Gravity Assist


VB Program: "VB Slingshot" Operation

The program uses two displays or forms: "Slingshot Control Form" and "Slingshot Simulation Display"

Slingshot Control Display

The VB program is controlled by three Commands:
  • "Select" This Command is used to select the parameter values.
  • "Start" This Command is used to start the simulation.
  • "Cancel" This Command is used to End the execution of the Visual Basic program.
The "Control Display" contains the following four selection parameters:

Simulation Display

When you start the program only the "Control Form" will be displayed. This form shows the "Select" Command in order to modify any of the 4 parameters.
After the parameters are modified (if requested) you select the "Select" Command which will change into the "Start" Command. The "Similation Display Form" will be displayed.

Slingshot Simulation Display

This form shows the following information.
  1. The position of the mass m1 in brown.
  2. The path of m2 (in yellow) and m3 (in black) in a small layout, slightly right from the center.
  3. The path of m2 (in yellow) and m3 (in black) in an enlarged layout, in the center.
  4. The distance between m2 and m3 in magenta also in the center. This line is V shaped. At the "bottom" the distance between m2 and m3 is almost zero.
  5. The speed v2 of m2 in black at the bottom of the display. In this case with m3 = 0 this path is straight.
  6. The speed v3 of m3 in yellow. What this line shows is that the overall speed decreases. There is a bump in the middle to demonstrate that the speed extra increases when m2 and m3 are close together.
  7. The speed v3 of m3 in red as a function of the escape velocity. The initial conditions are such that the speed of m3 is below the escape velocity. What the red line shows is that the final speed is above the escape velocity and will be ejected in space.


Simulation Results

The following table shows the result of 12 simulations.
The first 6 simulations demonstrate "Speed UP". The second 6 simulations demonstrate "Speed Down".
The first 3 simulations with "Speed UP" demonstrate a "small" effect. The second three the "large" effect. The same with "Speed Down"
Nr Speed Effect Mass V3 str V3 endV3 escape R avr R min
1 Up small 0 51,63 44,89 38,59 99.999 0,3476
2 Up small 20 51,63 44,75 38,60 99.718 0,3417
3 Up small 40 51,63 44,61 38,62 99.450 0,3358
4 Up large 0 51,63 60,45 37,74 99.999 0,0666
5 Up large 20 51,63 58,30 37,98 99.433 0,0624
6 Up large 40 51,63 56,16 38,21 99.107 0,0584
7 Down small 0 51,63 34,64 39,67 99.999 0,4442
8 Down small 20 51,63 34,55 39,68 100.222 0,4381
9 Down small 40 51,63 34,46 39,69 100.4520,4322
10 Down large 0 51,63 28,49 40,64 99.999 0,1604
11 Down large 20 51,63 27,92 40,69 100.642 0,1551
12 Down large 40 51,63 27,39 40,73 101.311 0,1499

VB Program: "VB Slingshot" executable

In order to get the Visual Basic 5.0 executable program use the following zip file:VB Slingshot.zip
The Visual Basic Executable program requires MSVDVM50.DLL: Msvdvm50.dll.zip

There is also a QBASIC program "slinshot.bas" available to demonstrate the "slingshot effect". For a description select: slingshot.htm.
In order to get a copy of the program "slinshot.bas" select: slinshot.zip. This zip file also contains the executable: "slinshot.exe"


Reflection


Feedback

No feedback received.


First Release: 10 January 2016

Back to my home page Contents of This Document